from django.db import models

# Create your models here.


class Person(models.Model):
    """
    进行原始查询
    raw() 管理器方法用于原始的SQL查询，并返回模型的实例
    """
    first_name = models.CharField(max_length=100)
    last_name = models.CharField(max_length=100)

    def __str__(self):
        return "first_name="+self.first_name+",last_name="+self.last_name

    def __unicode__(self):
        return "first_name=" + self.first_name + ",last_name=" + self.last_name


